package 依赖倒置原则.classes.error;

public class Switch 
{
	private Light light;

	public void setLight(Light light) 
	{
		this.light = light;
	}
	
	//打开
	public void on()
	{
		light.turnOnLight();
	}
}
